import { request } from 'umi';

// 获取文章列表
export function getArticleList(page: number = 1){
  let params = {
    page,
    pageSize: 12,
    status: 'publish'
  }
  return request('/api/article', {
    params
  });
}
//获取详情
export function getArticleDetail(id:string){
  return request(`/api/article/${id}`)
}
//获取归档数据
export function getArticleArchives(){
  return request(`/api/article/archives`)
}
//获取轮播图数据
export function getArticleSwiper(){
  return request(`/api/article/all/recommend`)
}
//支付
export function getArticleAlipay(obj:any){
  console.log(obj);
  return request('/api/alipay/create',{
    method: 'POST',
    data:obj
  })
}

